<#include "/common/head.html"/> 
<table id="dg"></table>
<div id="tb" style="padding:2px 5px;">
     <a href="javascript:void(0)" class="easyui-linkbutton addBtn" iconCls="glyphicon-remove" plain="true" onclick="back()">返回</a>
     <input type="hidden" value="${shop.id!''}" id="shopId">
     <input type="hidden" value="${shop.searchNumber!''}" id="searchNumber"></input>
	 <input type="hidden" value="${shop.balance!''}" id="balance"></input>
  	 <input type="hidden" value="${shop.name!''}" id="name"></input>
  	 <input type="hidden" value="${shop.username!''}" id="username"></input>
</div>
<script type="text/javascript">
//查询回显
var id=$("#shopId").val();
var searchNumber=$("#searchNumber").val();
var balance=$("#balance").val();
var name=$("#name").val();
var username=$("#username").val();

var datagrid = $("#dg");
var dgOptions = {
        rownumbers:true,
    	fit:true,
    	border:false,
    	striped:true,
        rownumbers:true,
    	url:'consumeDetail?id='+id,
    	method:'post',
    	toolbar:'#tb',
    	pageSize: 20,
    	pagination:true,
    	multiSort:true,
    	singleSelect:true,
        columns: [[
				   {field:'name', title:'产品名称', width:100}
	           	 ,{field:'price', title: '消费金额', width:100}
	           	 ,{field:'createTime', title: '消费时间', width:100}
	           ]]
	};
$(function() {
	datagrid.datagrid(dgOptions);
});

//修改
function update() {
	var rowsSel = datagrid.datagrid("getSelections");
	if(rowsSel.length != 1) {
		showWarnMsg("请选择一条数据！");
		return;
	}
	var id = rowsSel[0].id;
	location.replace('update?id='+id);
}

//返回
function back(){
	location.replace('detailpageList?id='+id+"&name="+name+"&balance="+balance+"&searchNumber="+searchNumber);
}
</script>
<#include "/common/dialogWindow.html"/>
<#include "/common/foot.html"/>